package com.lancoo.ccas53.arrangecourse;

import com.lancoo.ccas53.arrangecourse.entities.TimeslotRoom;
import com.lancoo.ccas53.pojo.dto.ArrangeTeachingClassDto;

import java.util.LinkedList;

/**
 * @Description 自动排课服务
 * @Author Fortysun
 * @Date 2023/5/15 20:00
 **/
public interface ArrangeCourseService {
    /**
     * 算法排课
     *
     * @param taskId    排课计划id
     * @param collegeId 院系id，教务管理员登录传null
     * @param majorProp 课程类型，1：公共课， 2：专业课
     */
    void algService(Integer taskId, String collegeId, Integer majorProp);

    /**
     * 针对排课手动调整功能，获取可用的教室、课时分组信息
     *
     * @param schoolId      学校id
     * @param termId        学期id
     * @param taskId        排课计划id
     * @param weeks         当前手动调整的教学班，需要调整的周次信息(二进制字符串，如：00011000000)
     * @param timeCodes     教学班所学的课时编码，多个以逗号分隔，如：0101,1012   0303,0304（null获取全部）
     * @param roomId        教学班排课所学的教室id（null获取全部）；
     * @param teachingClass 手动调课的教学班信息
     * @return
     */
    LinkedList<TimeslotRoom> getAvailableTimeslotRoomList(String schoolId,
                                                          String termId,
                                                          Integer taskId,
                                                          String weeks,
                                                          String timeCodes,
                                                          Integer campusId,
                                                          Integer buildingId,
                                                          Long roomId,
                                                          String keyword,
                                                          ArrangeTeachingClassDto teachingClass,
                                                          Integer departId,
                                                          Integer conflictCheck, String collegeId, int outer);

    LinkedList<TimeslotRoom> getAvailableTimeslotRoomListV2(String schoolId,
                                                            String termId,
                                                            Integer taskId,
                                                            String weeks,
                                                            String timeCodes,
                                                            Integer campusId,
                                                            Integer buildingId,
                                                            Integer selectRoomType,
                                                            Long roomId,
                                                            String keyword,
                                                            ArrangeTeachingClassDto teachingClass,
                                                            Integer departId,
                                                            Integer conflictCheck, String collegeId, int outer);

    LinkedList<TimeslotRoom> getAvailableTimeslotRoomListSelect(String schoolId,
                                                                String termId,
                                                                Integer taskId,
                                                                String weeks,
                                                                String timeCodes,
                                                                Integer campusId,
                                                                Integer buildingId,
                                                                Long roomId,
                                                                String keyword,
                                                                ArrangeTeachingClassDto teachingClass,
                                                                Integer departId,
                                                                Integer conflictCheck, String collegeId);

    /**
     * 手动调整之后的数据更新，更新冲突表和教学班的排课冲突状态
     *
     * @param schoolId        学校id
     * @param termId          学期id
     * @param taskId          计划id
     * @param campusId        校区id
     * @param teachingClassId 教学班Id
     */
    void manualAdjustmentUpdate(String schoolId,
                                String termId,
                                Integer taskId,
                                String campusId,
                                Long teachingClassId);
}
